﻿
@model YouWei.Infrastructure.Entity.Product
@using YouWei.Infrastructure.Entity;
@{

    var Imgs = ViewBag.Imgs as List<ProductImage> ?? new List<ProductImage>();
    ViewBag.Title = "产品详情";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


<section class="content-header">
    <h1>
        产品管理
        <small></small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i>主页</a></li>
        <li class="active">产品详情</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="box box-primary">
                <div class="box-header">
                    <table class="table table-striped">
                        <tr>
                            <td>名称</td>
                            <td>@Model.ProductName</td>

                        </tr>
                        <tr>
                            <td>产品类别</td>
                            <td>@Model.ProductType</td>
                            <td>用户ID</td>
                            <td>@Model.UserID</td>
                        </tr>
                        <tr>
                            <td>是否全部可见</td>
                            @if (@Model.ShareType == 1)
                            {
                                <td>个人不共享</td>
                            }
                            else if (@Model.ShareType == 2)
                            {
                                <td>共享所有人</td>
                            }
                            else
                            {
                                <td>共享特定群组</td>
                            }

                            <td>来源产品</td>
                            <td>@Model.SourceID</td>
                        </tr>
                        <tr>
                            <td>创建时间</td>
                            <td>@Model.CreateDate.ToString("yyyy-MM-dd HH:mm")</td>
                            <td>更新时间</td>
                            <td>@Model.UpdateDate.ToString("yyyy-MM-dd HH:mm")</td>
                        </tr>
                        <tr>
                            <td>OpenID</td>
                            <td>@Model.OpenID</td>
                            <td>公司ID</td>
                            <td>@Model.CompanyID</td>
                        </tr>
                        <tr>
                            <td>简图</td>
                            <td><img class="" style="max-height:100px;" src="@Model.HeadImgUrl" /> </td>
                        </tr>
                        <tr>
                            <td>简介</td>
                            <td colspan="3">@Model.ProductDesc</td>
                        </tr>
                        <tr>
                            <td>详情</td>
                            <td colspan="3">@Model.ProductDetail</td>
                        </tr>
                        <tr>
                            <td>产品图片：</td>
                            <td>
                                <table>
                                    @if (Imgs.Count > 0)
                                    {
                                        <tr>
                                            @for (var i = 0; i < Imgs.Count; i++)
                                            {
                                                if (i < 3)
                                                {
                                                    <td><img class="" style="max-height:100px; max-width:100px" src="@Imgs[i].ImageUrl" /></td>
                                                }
                                            }
                                        </tr>
                                    }
                                    @if (Imgs.Count > 3)
                                    {
                                        <tr>
                                            @for (var i = 3; i < Imgs.Count; i++)
                                            {
                                                if (i < 6)
                                                {
                                                    <td><img class="" style="max-height:100px; max-width:100px" src="@Imgs[i].ImageUrl" /></td>
                                                }
                                            }
                                        </tr>
                                    }
                                    @if (Imgs.Count > 6)
                                    {
                                        <tr>
                                            @for (var i = 6; i < Imgs.Count; i++)
                                            {
                                                <td><img class="" style="max-height:100px; max-width:100px" src="@Imgs[i].ImageUrl" /></td>
                                            }
                                        </tr>
                                    }
                                </table>
                            </td>
                        </tr>
                       
                    </table>
                </div>
            </div>
        </div>
</section>
@section scriptsBottom{

}